To use - highlight a SMOOTH FADE effect. Then run this ARexx routine. It will allow you to set a timing for this and every SMOOTH FADE effect that follows. Place a STOP icon in your project to limit this routine. */
call remlib('PROJECT_REXX_PORT')
call addlib('PROJECT_REXX_PORT',0)
start_loc=croutonspot()
project_end=croutonsinproject()
current_spot=start_loc
call croutonpick(current_spot)
/* --- wait for any screen update delay --- */
call time('R')
do while (time('E')<0.5)
call req_open("Set Fade Times - by Aussie","---------------------------","Sets all SMOOTH FADE effects to the same duration.","From selected clip to STOP icon, or end.")
if (croutontype()~="ALGO") then do
call req_tell("<< Canceled >>"," Select a FADE EFFECT first")
call req_close()
call quit()
end
f_numfields=croutongettag(numfields)
f_numframes=(f_numfields%2)
f_want=req_time("Set duration",f_numframes)
if f_want="CANCEL" then do
call req_close()
call quit()
end
fm=substr(f_want,4,2)
fs=substr(f_want,7,2)
ff=substr(f_want,10,2)
f_all=((fm*1800)+(fs*30)+ff)*2
if f_all<2 then do
call req_tell("<< Canceled >>" ," Zero length is too small")
call req_close()
call quit()
end
/* Proceed or not */
test=req_tell("Duration of " f_want ," Set fades to this duration?")
call req_close()
if test=0 then call quit()
/* f_numfields=(test*2) */
call croutonsettag(variablefcount,f_all)
call croutonsettag(numfields,f_all)
call croutonsettag(fcountmode,2)
call croutonsettag(numframesvariable,(f_all%2))
do while (current_spot<project_end)
current_spot=current_spot+1
call croutonpick(current_spot)
if (croutontype()="ALGO") then do
call croutonsettag(numfields,f_all)
call croutonsettag(variablefcount,f_all)
call croutonsettag(fcountmode,2)
call croutonsettag(numframesvariable,(f_all%2))
end
if croutontype()="CTRL" then do
test=croutonname()
test1=right(test,length(test)-lastpos("/",test))
test3=("STOP" = upper(test1))
if test3=1 then do
call projectupdate()
call croutonpick(start_loc)
call req_error(" OZ: Performed till STOP icon! <<< Fades have new matching times >>>")
call quit2()
end
end
end
call projectupdate()
call croutonpick(start_loc)
call req_error(" OZ: All Done! <<< Fades have new matching times >>>")
call quit2()
quit:
call croutonpick(start_loc)
call req_error(" OZ: <<< Last Operation Canceled >>>")